<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib uri="/page" prefix="public"%>
<public:pageControl classPath="app.web.hcartoon.collect.HCartoonDetailEdit"/>
<script type="text/javascript">

	function HCartoonDetailGrid_window_afterOnload(windows,page){
		
		var state = page.element.parameter.state;
		
		var canID = page.element.parameter.CAN_ID;
		
		if(state == "insert" || state == "past"){
			
			var sendSet = new Yacon.data.DataSet(page);
			sendSet.setWhereField("canID",canID);
			sendSet.switchMessage("loadData");
			
			var form = page.find("HCartoonMainForm");
			
			if(sendSet.next()){	
				form.value("CAN_NAME",sendSet.getDataSetValue("CAN_NAME"));
				form.value("CAN_NAM_ENG",sendSet.getDataSetValue("CAN_NAM_ENG"));
				form.value("CAN_NAM_JAP",sendSet.getDataSetValue("CAN_NAM_JAP"));
				form.value("CAN_FIRST",sendSet.getDataSetValue("CAN_FIRST"));
			}
			
		}
	}
	
	function siteAnalyse_click(form,page){
		
		var mainForm = page.find("HCartoonMainForm");
		var appForm = page.find("HCartoonDetailForm");
		
		var sendSet = new Yacon.data.DataSet(page);
		sendSet.setWhereField("NET_ANT_SITE",mainForm.value("NET_ANT_SITE"));
		sendSet.switchMessage("analyseData");
		
		if(sendSet.next()){		
			appForm.value("CAN_TAG_MEMO",sendSet.getDataSetValue("TAGS"));
			appForm.value("CAN_FIRM_MEMO",sendSet.getDataSetValue("FIRM"));
		}
		
	}
	
</script>